<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%collect}}".
 *
 * @property integer $id
 * @property integer $customer_id
 * @property integer $sales_id
 * @property string $created_at
 * @property string $remark
 * @property integer $status
 */
class Collect extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%collect}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    /*public static function getDb()
    {
        return Yii::$app->get('db2');
    }*/

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['customer_id', 'sales_id', 'status'], 'integer'],
            [['remark'], 'string'],
            [['created_at'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自动编号'),
            'customer_id' => Yii::t('zhtfrontend', '会员id'),
            'sales_id' => Yii::t('zhtfrontend', 'sales表ID'),
            'created_at' => Yii::t('zhtfrontend', '收藏时间'),
            'remark' => Yii::t('zhtfrontend', '备注'),
            'status' => Yii::t('zhtfrontend', '0:不显示;1:显示'),
        ];
    }
}
